package test

import config.MyFile

object test4 extends MyFile{

  def main(args: Array[String]): Unit = {


    "I:\\alfalfa_db\\tmp/sg_RNA.targs".readLines.map{x=>
      val line = x.split("\t")
      val chr = line.head
      val start = line(2)
      val end = line(3)
      val strand = line(4)
      val id = chr+"_"+start+"_"+end
      val gc = line(5)
      val off = line.drop(6).headOption.getOrElse("").split(" ").map(_.trim).mkString(",")
      s"$chr\tGRNA\tgene\t$start\t$end\t.\t$strand\t.\tID=$id;GC%=$gc;Offtargs=$off;"
    }.foreach(println)
  }
}
